/*
 * 
 * 
 * 
 */
package com.hboxs.asl.dao.impl;

import com.hboxs.asl.dao.MemberAttributeDao;
import com.hboxs.asl.entity.MemberAttribute;
import org.springframework.stereotype.Repository;

import javax.persistence.FlushModeType;
import java.util.List;

/**
 * Dao - 会员注册项
 */
@Repository("memberAttributeDaoImpl")
public class MemberAttributeDaoImpl extends BaseDaoImpl<MemberAttribute, Long> implements MemberAttributeDao {

    public Integer findUnusedPropertyIndex() {

        return null;
    }

    public List<MemberAttribute> findList() {
        String jpql = "select memberAttribute from MemberAttribute memberAttribute where memberAttribute.isEnabled = true order by memberAttribute.order asc";
        return entityManager.createQuery(jpql, MemberAttribute.class).setFlushMode(FlushModeType.COMMIT).getResultList();
    }

    /**
     * 清除会员注册项值
     *
     * @param memberAttribute 会员注册项
     */
    @Override
    public void remove(MemberAttribute memberAttribute) {

    }

}